package com.xxg.renrensearch.domain.query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 根据排序条件获取商品
 *
 * @author xxg
 * @date 2021/11/29
 */
@Data
@ApiModel(value = "GetProductByConditionQuery", description = "根据排序条件获取商品")
public class GetProductByOrderTypeQuery {
    @ApiModelProperty(value = "自己的店铺ID", hidden = true)
    private Integer myShopId;
    @NotNull(message = "shopId不能为null")
    @ApiModelProperty(value = "店铺ID")
    private Integer shopId;
    @NotNull(message = "orderType不能为null")
    @Min(value = 0, message = "orderType不能小于0")
    @Max(value = 1, message = "orderType不能大于1")
    @ApiModelProperty(value = "排序字段，0-销量，1-价格")
    private Integer orderType;
    @NotNull(message = "sortType不能为null")
    @Min(value = 0, message = "sortType不能小于0")
    @Max(value = 1, message = "sortType不能大于1")
    @ApiModelProperty(value = "排序方向，0-升序，1-降序")
    private Integer sortType;
    @NotNull(message = "pageNo不能为null")
    @Min(value = 1, message = "pageNo的值不能小于1")
    @ApiModelProperty(value = "页码")
    private Integer pageNo;
    @NotNull(message = "categories不能为null")
    @ApiModelProperty(value = "商品分类ID列表")
    private List<Integer> categories;
    @Min(value = 0, message = "carryAuth不能小于0")
    @Max(value = 2, message = "carryAuth不能大于2")
    @ApiModelProperty(value = "带货权限，null-全部，0-需要申请，1-无需申请，2-不支持带货")
    private Integer carryAuth;
    @Min(value = 0, message = "carryStatus不能小于0")
    @Max(value = 1, message = "carryStatus不能大于1")
    @ApiModelProperty(value = "带货状态，null-全部，0-已带货，1-未带货")
    private Integer carryStatus;
}